//main.cc
#include "ThreadPoolV1.hpp"
//#include "ThreadPoolV2.hpp"
//#include "ThreadPoolV3.hpp"
// #include "ThreadPoolV4.hpp"
#include "Task.hpp"
#include <cstring>
#include <memory>
int main()
{
    //ThreadPool<Task>* pool=ThreadPool<Task>::GetInstance();
     srand((uint64_t)time(0));
    ThreadPool<Task>* pool=new ThreadPool<Task>;
    //pool->Init();
    pool->Start();
    //pool->Check();
    while(1)
    {
        int x=rand()%10;
        int y=rand()%20;
        char arr[]="+-*/%";
        char op=arr[rand()%strlen(arr)];
        pool->push(Task(x,y,op));
        sleep(1);
    }

    return 0;
}

